//  先创建一个express 服务器 
const express = require('express')
const bodyParser = require('body-parser')
// 导入接口
const router = require('./router')
// 解决跨域问题 
const cors = require('cors')
const app = express()
// 挂载
app.use(bodyParser.urlencoded({
    extended: false
}))
app.use(cors())
app.use(router)


// 监听后端5000
app.listen('5000', function () {
    console.log('this serve is running at http://127.0.0.1:5000')
})